package com.wd.mainmodel;

import android.app.Application;

import com.wd.base.component.AppConfig;
import com.wd.base.component.ComponentsService;
import com.wd.base.component.IAppComponent;
import com.wd.base.config.Constance;
import com.wd.base.router.ARouter;
import com.wd.base.util.Logger;

/**
 * NA<BR>
 *
 * @author w4425
 * @version [V1.0.0, 2021/4/21]
 * @since V1.0.0
 */
public class MainApp extends Application implements IAppComponent {
    @Override
    public void initialize(Application app) {
        // 注册自己到组件服务
        Logger.d("initialize start");
        ComponentsService.setAppComponent(AppConfig.PAGE_TYPE.MAIN, this);
        //路由
        if (!Constance.isRouterAnnotation) {
            ARouter.getInstance().addActivity(Constance.MODULE_URL_MAIN, MainActivity.class);
        }
    }
}
